Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: PodMonitor #2921

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kariya-mitsuru
Copy link
Contributor

Description

Fix PodMonitor.

  • crd-replicator

    Commit 10ef308 changed the default port for metrics from 8080 to 8082, but crd-replicator was not changed because there is no command line option. However, only the Deployment port was changed to 8082, so PodMonitor no longer works properly.

    This commit reverts the Deployment port back to 8080.

  • VirtualKubelet

    Commit ddafea0 changed the label of VirtualKubelet but did not change the PodMonitor selector so it no longer works correctly.

    This commit makes PodMonitor's selector follow commit ddafea0.

@github-actions github-actions bot added the fix Fixes a bug in the codebase. label Feb 6, 2025
@adamjensenbot
Copy link
Collaborator

Hi @kariya-mitsuru. Thanks for your PR!

I am @adamjensenbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch (You can add the option test=true to launch the tests
    when the rebase operation is completed)
  • /merge: Merge this PR into the master branch
  • /build Build Liqo components
  • /test Launch the E2E and Unit tests
  • /hold, /unhold Add/remove the hold label to prevent merging with /merge

Make sure this PR appears in the liqo changelog, adding one of the following labels:

  • feat: 🚀 New Feature
  • fix: 🐛 Bug Fix
  • refactor: 🧹 Code Refactoring
  • docs: 📝 Documentation
  • style: 💄 Code Style
  • perf: 🐎 Performance Improvement
  • test: ✅ Tests
  • chore: 🚚 Dependencies Management
  • build: 📦 Builds Management
  • ci: 👷 CI/CD
  • revert: ⏪ Reverts Previous Changes

@@ -50,7 +50,7 @@ spec:
resources: {{- toYaml .Values.crdReplicator.pod.resources | nindent 12 }}
ports:
- name: metrics
containerPort: 8082
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kariya-mitsuru, thanks for your PR. Can you keep the "8082" port and add a flag inside the CRD replicator to set the port, please?

Could you edit /cmd/crd-replicator/main.go.

Check this

metricsAddr := pflag.String("metrics-address", ":8082", "The address the metric endpoint binds to")
to have a guideline about how to implement it.

* crd-replicator

Commit 10ef308 changed the default port for metrics from 8080 to 8082,
but crd-replicator was not changed because there is no command line option.
However, only the deployment port was changed to 8082, so PodMonitor no
longer works properly.

This commit adds the command line option, which defaults to 8082.

* virtualkubelet

Commit ddafea0 changed the label of VirtualKubelet but did not change
the PodMonitor selector so it no longer works correctly.

This commit makes PodMonitor's selector follow commit ddafea0.

Signed-off-by: Mitsuru Kariya <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixes a bug in the codebase. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants